//package qj.tool.jna;
//
//import java.awt.event.KeyEvent;
//
//import qj.util.Clipboard;
//import qj.util.SystemUtil;
//import qj.util.ThreadUtil;
//import qj.util.funct.P0;
//
//public class KeyboardHooks extends KeyboardHandler {
//	public static void init() {
//		if (!SystemUtil.isWindows()) {
//			GlobalScreen.getInstance().addNativeKeyListener(
//				new NativeKeyListener() {
//					public void keyReleased(NativeKeyEvent ke) {
//						inform(false, ke.getKeyCode());
//					}
//
//					public void keyPressed(NativeKeyEvent ke) {
//						int keyCode = ke.getKeyCode();
//						int modifiers = ke.getModifiers();
//						if (
//								(keyCode==KeyEvent.VK_SHIFT && (modifiers & 1) ==0) ||
//								(keyCode==KeyEvent.VK_CONTROL && (modifiers & 2) ==0) ||
//								(keyCode==KeyEvent.VK_META && (modifiers & 4) ==0) ||
//								(keyCode==KeyEvent.VK_ALT && (modifiers & 8) ==0)
//								) {
//							inform(false, keyCode);
//						} else {
//							inform(true, keyCode);
//						}
//						// ctrl: 2
//						// alt: 8
//						// meta: 4
//					}
//				}
//			);
//		}
//	}
//	
////	public static void main(String[] args) {
////		System.out.println(KeyEvent.VK_DELETE);
////	}
//	
//	public static void main1(String[] args) {
//		init();
////		listenRelease('1', new P0() {public void e() {
////			if (isPressed(KeyEvent.VK_SHIFT)&&isPressed(KeyEvent.VK_CONTROL)) {
////				ThreadUtil.delayedExec(400, new P0() {public void e() {
////					DesktopUtil.type(KeyEvent.VK_CAPS_LOCK);
////
////					String text = Clipboard.getText();
////					if (text==null) {
////						return;
////					}
////					
////					String newText = RegexUtil.replaceAll(text, "(^|-)(\\w)", new F1<Matcher,String>() {public String e(Matcher obj) {
////						return obj.group(2).toUpperCase();
////					}});
////					
////					Clipboard.type(newText);
////				}});
////			}1!1
////		}});11
//		listenRelease('1', new P0() {public void e() {
//			if (isPressed(KeyEvent.VK_SHIFT)&&isPressed(KeyEvent.VK_CONTROL)) {
//				ThreadUtil.delayedExec(400, new P0() {public void e() {
//					String text = Clipboard.getText();
//					if (text==null) {
//						return;
//					}
//					
//					
////					String newText = RegexUtil.replaceAll(text, "(^|-)(\\w)", new F1<Matcher,String>() {public String e(Matcher obj) {
////						return obj.group(2).toUpperCase();
////					}});
//					
//					Clipboard.type(text
//							+ "\n    <!-- CR1978 - starts -->"
//							+ text.replaceAll("\"/>$", "_gb\"/>")
//							+ text.replaceAll("\"/>$", "_de\"/>")
//							+ "\n    <!-- CR1978 - ends -->"
//							);
//				}});
//			}
//		}});
//	}
//}
